package org.example;

import org.example.domain.User;
import org.example.service.UserService;

import java.util.List;

/**
 * @author hsc
 * @date 2024-02-02
 * @Description
 */
public class Main {
    public static void main(String[] args) {
        UserService userService = new UserService();
        //新增
//        User user=new User(5,"hscss",88);
//        userService.registNewUser(user);
        //删除
        userService.deleteUser(4);
        //修改
//        userService.updateUser(user);
        //查询单条数据
        User result = userService.queryUser(4);
        System.out.println(result.toString());
        //查询全部的数据
        List<User> users = userService.queryAll();
        System.out.println(users);
    }
}